package abstractTest;

public class TestInstrument {
    public static void main(String[] args) {
        // 创建对象
        Instrument instrument1 = new Guitar();
        Instrument instrument2 = new Piano();

        // 调用play方法
        instrument1.play();
        instrument1.printType();

        System.out.println("========================");

        instrument2.play();
        instrument2.printType();
    }
}
